<?php
class Tourism_provider_category_model extends CI_Model
{
    private $table = 'tourism_provider_category';
    
     /**
     * 根据供应商UID获取
     * @param unknown $providerUid
     */
    public function providerCategoryByUid($providerUid){
    	
        $this->db->select('id,provider_uid,category_name,is_main');
        $this->db->from($this->table);
        $this->db->where('provider_uid',$providerUid);
        $this->db->where('is_on_sale','1');//商品分类上架
        $this->db->where('is_main',1);//不是主推类
        $this->db->limit(8); //控制8个显示
        $this->db->order_by('sort','desc');
        return $this->db->get();
    }
}